package com.zhaofujun.filequeue;

public class WriteInfo {

    private  long num;
    private  long offset;

    public WriteInfo(long num, long offset) {
        this.num = num;
        this.offset = offset;
    }

    public long getNum() {
        return num;
    }

    public long getOffset() {
        return offset;
    }


    public WriteInfo newWrite(long dataLength) {
//        return new WriteInfo(num + 1, offset + dataLength);
        return new WriteInfo(num+1, offset + dataLength);
    }

        @Override
        public String toString() {
            return "WriteInfo{" +
                    "num=" + num +
                    ", offset=" + offset +
                    '}';
        }
}

